Do not redfine LiquidDroppable classes

This fixes the 'previous definition of xDrop was here' warning when
running in the development environment which cache_classes disabled

Dominik Sander 10 years ago
parent
commit
45e4bcda37
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/concerns/liquid_droppable.rb

+ 1 - 1
app/concerns/liquid_droppable.rb

@@ -21,7 +21,7 @@ module LiquidDroppable
21 21
   end
22 22
 
23 23
   included do
24
-    const_set :Drop, Kernel.const_set("#{name}Drop", Class.new(Drop))
24
+    const_set :Drop, Kernel.const_set("#{name}Drop", Class.new(Drop)) unless const_defined?("#{name}Drop")
25 25
   end
26 26
 
27 27
   def to_liquid